<div class="right">
	<div id="columns1">
		<ul id="column2" class="main">

			<li class="widget1 color-green1" id="widget12">
				<div class="widget1-head">
					<h3>
						ip黑名单设置
					</h3>
				</div>
				<div class="widget1-content">
				<table><tr><td>
           <span class="STYLE2">尊敬的用户您好！欢迎您使用释冠统计系统</span>
           <IMG SRC="<?=$this->config->item("img_url")?>line.jpg" WIDTH=100% HEIGHT=5></td>
           </tr>
           </table>
       <FORM id="frmIP" METHOD=POST ACTION="#">
          <tr>
          <td height="52"><p><br><br>
            <span class="STYLE3">黑名单管理：</span>
			<TABLE>
			<TR>
				<TD><span class="STYLE1">*</span> 举报恶意（黑名单）ip地址</TD>
				<TD><INPUT TYPE="text" NAME="IPStart" maxLength="16" size="15"> - <INPUT TYPE="text" NAME="IPEnd" maxLength="16" size="15"></TD>
				<TD></TD>
				<TD></TD>

			</TR>
			<TR>
				<TD><span class="STYLE1">*</span> 备注信息（例如某竞争公司IP）</TD>
				<TD>
				    <textarea rows="4" cols="60" NAME="note" ></textarea>
				</TD>
				<TD><INPUT TYPE="button" onClick="addIP()" id="insIP" value="添加" style="border: 1px #FFFFFF solid; background: #efefef;style=cursor:pointer"></TD>
				<TD></TD>
			</TR>
			</TABLE>
			  <TABLE border="1" cellpadding="1" bordercolor="#3D7AA9" style="border-collapse: collapse">
				  <TR height="22">
					<Th width="20" >序号</Th>
					<Th width="200" >IP地址</Th>
					<Th width="200" >备注</Th>
					<Th width="150" >添加时间</Th>
					<Th width="30" >操作</Th>
				  </TR>
				<?php foreach(@$data as $key=>$res):?>
				  <TR height="22">
					<TD><?=$key+1?></TD>
					<TD><?=$res['IPStart']?> - <?=$res['IPEnd']?> </TD>
					<TD><?=$res['Note']?>&nbsp;&nbsp;</TD>
					<TD><?=$res['InsTime']?></TD>
					<TD><div id="del" onClick="clickDel('<?=$res['id']?>')"><FONT COLOR='#FF6600' style='cursor:pointer'><B>删除</B></FONT></div></TD>
				  </TR>
				<?php endforeach; ?>

			   </TABLE></p>
              </p></td>
            <TD width="694">  </TD><td height="52"><p><br>
              </td>
          </tr>
          </FORM>
        </table></TD>
	  </TR>
    <TR>
      <TD COLSPAN=7>
        <IMG SRC="<?=$this->config->item("img_url");?>1230_1-16.jpg" WIDTH=100% HEIGHT=15></TD>
	  </TR>
  </TABLE>
	</div>
	</li>

	</ul>
</div>
</div>
</div>
</div>
<SCRIPT LANGUAGE="JavaScript">
<!--
function addIP(){
	var frm = document.getElementById("frmIP");
	var IPStart = document.getElementById("IPStart");
	var IPEnd = document.getElementById("IPEnd");
	if (isIP(IPStart)) {
		alert("请正确输入IP地址！");
		return;
	}
	if (isIP(IPEnd)) {
		alert("请正确输入IP地址！");
		return;
	}
	var note = document.getElementById("note");
	frm.action = "<?=$this->config->item("site_url");?>SystemFunctions/saveipblack";//正式上线需要修改
	frm.submit();
}
function clickDel(oid){
	var frm = document.getElementById("frmIP");
	var net = confirm("确定要删除？");
	if (net) {
		frm.action = "./del_ipblack?id=" + oid;
		frm.submit();
	} else {
		return;
	}
}
function isIP(str){
	var ip =/^([1-9]|[1-9]\d|1\d{2}|2[0-1]\d|22[0-3])(\.(\d|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])){3}$/;
	return ip.test(str);
}
//-->
</SCRIPT>